package com.houpu.service;

import com.houpu.dao.EmpMapper;
import com.houpu.pojo.Department;
import com.houpu.pojo.Emp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author liu
 * @create 2019-11-09-14:34
 */
@Service
public class EmpService {
    @Autowired(required = false)
    private EmpMapper empMapper;

    public List<Emp> queryAll(){
        return empMapper.queryAll();
    }
    public List<Emp> queryEmpE_isor0(){
        return empMapper.queryEmpE_isor0();
    }
    public List<String> queryP_name(){
        return empMapper.queryP_name();
    }

    //添加Emp员工
    public int insert(Emp emp){

        return empMapper.insert(emp);
    }
    public int update(Emp emp){

        return empMapper.update(emp);
    }

    public int delete(Emp emp){
        return empMapper.updateE_is(emp);
    }
    public int updateE_isor1(Emp emp){
        return empMapper.updateE_isor1(emp);
    }

}
